// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from "@/utils/request.js";

/**
 * 获取用户信息
 * 
 */
export function GetNewComerQuestionInfo(data) {	
	return request.get('wx/NewComerIndex/GetNewComerQuestionInfo?PromotionUsersId='+data.PromotionUsersId,{},{noAuth: true});
	// return request.get(`wx/NewComerIndex/GetNewComerQuestionInfo?PromotionUsersId=${data.PromotionUsersId}`,{noAuth: true});
}

export function GetUserCouponBag(data) {
	
	var reval="";
	if(data.couponType.length>0){
		reval+=`&LuckyDrawCouponType=${data.couponType}`;
	}
	if(data.userType.length>0){
		reval+=`&PromotionUserType=${data.userType}`;
	}
	return request.post(`wx/Home/GetUserCouponBag?openid=${data.openid}${reval}`,{},{noAuth: true});
	// return request.get(`wx/NewComerIndex/GetNewComerQuestionInfo?PromotionUsersId=${data.PromotionUsersId}`,{noAuth: true});
}
export function SubmitAnswer(data) {	
	return request.get(`wx/NewComerIndex/SubmitAnswer?PromotionsId=1&openid=1&QuestionId=${data.QuestionId}&PromotionsNewComerAnswerId=${data.AnswerId}`,{},{noAuth: true});
	// return request.get(`wx/NewComerIndex/GetNewComerQuestionInfo?PromotionUsersId=${data.PromotionUsersId}`,{noAuth: true});
}
export function mapbbanner(data) {
	
	return request.post('mapbbanner',data,{noAuth: true});
}

